
#version 430 core
struct ModelData
{
    vec4 position;
    vec4 texcoord;
    vec4 normal;
    vec4 whichTexcoord;
};

layout (std430, binding=0)buffer Mesh{
    ModelData vertexes[];
}mesh;

uniform mat4 view;
uniform mat4 projection;

out vec2 vs_texcoord;
out vec3 vs_normal;
out float vs_whichTexcoord;

void main()
{
    vs_texcoord = mesh.vertexes[gl_VertexID].texcoord.xy;
    vs_normal = mesh.vertexes[gl_VertexID].normal.xyz;
    vs_whichTexcoord = mesh.vertexes[gl_VertexID].whichTexcoord.x;
    gl_Position = projection * view * vec4(mesh.vertexes[gl_VertexID].position.xyz, 1.0);
}

